Skip to content

Adição do Docker e do Dusk#81

Open
Dreamwanter5 wants to merge 4 commits into
uspdev:masterfrom
Dreamwanter5:master
Open

Adição do Docker e do Dusk#81
Dreamwanter5 wants to merge 4 commits into
uspdev:masterfrom
Dreamwanter5:master

Conversation

@Dreamwanter5

Copy link
Copy Markdown
  • A dockerização não foi feita no FROM utilizando "latest" mas sim a versão 8.4 do PHP
  • Está contido um teste simples do Dusk no arquivo "IndexTest.php"

Copilot AI review requested due to automatic review settings June 1, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Laravel Dusk browser testing scaffolding and Docker setup to run the app (and optionally browser tests) in containers.

Changes:

  • Introduces Dusk base test case, example Dusk pages, and browser tests.
  • Adds Dockerfile + docker-compose services for app + MariaDB + Selenium.
  • Adds .gitignore placeholders for Dusk artifacts (screenshots/console/source).

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/DuskTestCase.php Adds Dusk test base class and RemoteWebDriver configuration.
tests/Browser/IndexTest.php Adds a Dusk test asserting home page content.
tests/Browser/ExampleTest.php Adds a sample Dusk test asserting home page content.
tests/Browser/Pages/Page.php Adds base Dusk page class with shared selectors.
tests/Browser/Pages/HomePage.php Adds Home page object with URL and selectors.
tests/Browser/source/.gitignore Keeps Dusk source folder tracked while ignoring artifacts.
tests/Browser/screenshots/.gitignore Keeps screenshots folder tracked while ignoring artifacts.
tests/Browser/console/.gitignore Keeps console folder tracked while ignoring artifacts.
dockerfile Adds an Apache/PHP container image build for the app.
docker-compose.yml Adds services for app, MariaDB, and Selenium Chrome.
composer.json Adds laravel/dusk dev dependency and reorders dev deps.
Files not reviewed (1)
  • .phpunit.cache/test-results: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/DuskTestCase.php
Comment on lines +22 to +24
if (! static::runningInSail()) {
static::startChromeDriver(['--port=9515']);
}
Comment thread tests/DuskTestCase.php
Comment on lines +43 to +45
return RemoteWebDriver::create(
$_ENV['DUSK_DRIVER_URL'] ?? env('DUSK_DRIVER_URL') ?? 'http://localhost:9515',
DesiredCapabilities::chrome()->setCapability(
Comment thread docker-compose.yml
Comment on lines +17 to +18
environment:
HOME: /tmp
Comment thread docker-compose.yml
Comment on lines +35 to +42
selenium:
image: selenium/standalone-chrome
container_name: empresta_selenium
ports:
- "7900:7900" # VNC (pra ver o browser rodando)
networks:
- empresta-network
shm_size: 2gb
Comment thread Dockerfile
RUN sed -i 's|/var/www/html|/var/www/html/public|' \
/etc/apache2/sites-available/000-default.conf

USER www-data
Comment thread Dockerfile
--optimize-autoloader \
--no-interaction

CMD ["apache2-foreground"]

namespace Tests\Browser;

use Illuminate\Foundation\Testing\DatabaseMigrations;
Comment thread tests/Browser/ExampleTest.php Outdated

namespace Tests\Browser;

use Illuminate\Foundation\Testing\DatabaseMigrations;
@Dreamwanter5 Dreamwanter5 reopened this Jun 1, 2026
@Dreamwanter5 Dreamwanter5 marked this pull request as draft June 1, 2026 14:11
@Dreamwanter5 Dreamwanter5 marked this pull request as ready for review June 1, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants